//颜色
@white:           #FFFFFF;
@black:           #000000;
@color85:         rgba(0, 0, 0, 0.85);
@color65:         rgba(0, 0, 0, 0.65);
@color45:         rgba(0, 0, 0, 0.45);
@color25:         rgba(0, 0, 0, 0.25);
@font-yellow:     #E8B900;
@font-bule:       #2CBDE9;
@font-red:        #F2637B;

//字体
@font-size12:     12px;
@font-size14:     14px;
@font-size16:     16px;
@font-size18:     18px;
@font-size20:     20px;

//间距
@gap5:            5px;
@gap8:            8px;
@gap10:           10px;
@gap16:           16px;
@gap20:           20px;
@gap24:           24px;

//投影变量
@shadow:   0px 0px 3px;
@shadow-color: rgba(0, 0, 0, 5%);
.box-shadow(@style: @shadow, @color: @shadow-color) {
  box-shadow: @style @color;
}

//圆角变量
@radius:   5px;
.box-radius(@style: @radius) {
  border-radius: @style;
}

//高度变量
@minus: 180px;
.calc-height(@minus: @minus) {
  min-height: calc(100vh - @minus);
}


html, body, #root {
  height: 100%;
}

body {
  margin: 0;
  input, input:focus {
    background: @white;
  }
  .ant-tag {
    padding: 1px 6px;
    background: #f4f4f4;
    border: none;
    margin-bottom: 5px ;
  }
  .ant-btn {
    padding: 0 10px;
    .anticon {
      vertical-align: middle;
    }
  }
  .ant-table-thead,.ant-table-tbody {
    tr > th, tr >td {
       border: none;
       border-bottom: none;
     }
   } 
  .ant-table-tbody {
    color: @color65;
  }
  .ant-table-row .edit {
      visibility: hidden;
      color: skyblue;
  }
  .ant-table-row:hover .edit {
        visibility: visible;
  }
  /* carousel arrow */
  .ant-carousel .slick-prev,
  .ant-carousel .slick-next,
  .ant-carousel .slick-prev:hover,
  .ant-carousel .slick-next:hover,
  .ant-carousel .slick-prev:focus,
  .ant-carousel .slick-next:focus {
    font-size: inherit;
    color: currentColor !important;
  }
  .ant-carousel .slick-prev::before {
    color: currentColor !important;
  }
  .slick-arrow.slick-prev {
    font-size: 20px !important;
  }
  .ant-carousel .slick-next::before {
    color: currentColor !important;
  }
  .slick-arrow.slick-next {
    font-size: 20px !important;
  }
  .ant-carousel .slick-dots-bottom {
    bottom: -12px;
  }
  .ant-carousel .slick-dots li {
      background-color: @black;
    
  }
  .ant-carousel .slick-dots li.slick-active button {
    background-color: #ccc;
  }
  .ant-tag-error {
    color: @error-color;
    background: fade(@error-color, 10);
  }
  .ant-tag-success {
    color: @success-color;
    background: fade(@success-color, 10);
  }
  .ant-tag-warning {
    color: @warning-color;
    background: fade(@warning-color, 10);
  }
  .ant-card-head-title {
    padding: 10px 0;
    line-height: 32px;
  }
  //Task Details
  .ant-descriptions-item-label {
    color: @color65;
  }
  .ant-descriptions-item-content {
    color: @color85;
  }

  /** form **/
  .ant-form-item-label {
    font-weight: bold;
    color: @color85;
    > label:not(.ant-form-item-required):before {
      display: inline-block;
      margin-right: 4px;
      font-size: 14px;
      font-family: SimSun, sans-serif;
      line-height: 1;
      content: '*';
      opacity: 0;
    }
  }
  .ant-radio-button-wrapper,.ant-form-item-control-input-content {
      color:rgba(0, 0, 0, 0.45); 
    }
 
  //radio color styles
  .ant-radio-checked .ant-radio-inner {
   border: 1px solid @link-color;
  }
  .ant-radio-inner::after {
    background-color: @link-color;
  }

  // table
  td.ant-table-column-sort {
    background: none;
  }

  .ant-card {
    .box-radius();
    &.noShadow {
      box-shadow: 0px 0px 0px rgb(255 255 255);
    }
  }
  .ant-tabs-tab-active {
    font-weight: bold;
  }
}


// public component: breadcrumb 
.breadcrumb {
  height: 50px;
  line-height: 50px;
  background: @white;
  margin: 0 -5vw 20px;
  padding: 0 5vw;
  .box-shadow();
  .breadcrumbContent {
    line-height: 50px;
  }
}

// public box shadow radius 
.ant-card,
.actions,
.list {
  .box-shadow();
  .box-radius();
}
.ant-card {
  .list {
    .box-shadow(0 0 0 ,rgba(0, 0, 0, 0%));
  }
}

// public action bar 
.actions {
  background: @white;
  padding: @gap20;
  margin-bottom: @gap10;
  width: 100%;
}

// public list 
.list {
  background-color: @white;
  .ant-list-item,.ant-list-items .ant-list-item:last-child {
    padding: @gap10 @gap20;
    border: 1px solid rgba(0, 0, 0, 0.05);
    margin: @gap10 0;
    .box-radius();
    &:hover {
      border-color: @primary-color;
      .box-shadow(0 0 0 2px, rgba(54, 203, 203, 35%));
      cursor: pointer;
    }
    &.failure {
      border-color:@font-red;
    }
    &.sample {
      border-color: @primary-color;
      background-color: fade(@primary-color, 5);
    }
  }
  .ant-list-item-meta-title {
    font-size: @font-size18;
  }
  .title {
    .titleItem {
      font-size: @font-size14;
      font-weight: normal;
      margin-left: @gap20;
    }
  }
  .titleLabel, .bottomContent {
    display: inline-block;
    margin-right: @gap8;
    color: @color45;
  }
  .titleLabel {
    color: @color45;
  }
  .emphasis {
    color: @font-yellow;
  }
  .bottomLabel {
    color: @color65;
  }
  .content {
    padding-top: @gap5;
    text-align: center;
    .contentLabel {
      color:@color45;
      padding-bottom: @gap5;
    }
    .contentContent, .sets {
      color: @color85;
      font-size: @font-size20;
    }
    .sets {
      color: @primary-color;
      display: flex;
      justify-content: center;

      span {
        display: inline-block;
        overflow: hidden;
      }
      .setLabel{
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 120px;
        padding: 0 @gap5;
        &:first-child {
          color:@font-bule;
        }
      }
    }
    .currentIteration {
      color: @font-red;
    }
  }
}

// public dataset and model group 
.groupList {
  .groupTitle {
    line-height: 56px;
    border-bottom: 1px solid #eee;
    padding: 0 20px;
  }
  .foldBtn, .groupName {
    font-size: 14px;
    font-weight: bold;
    color: @link-color;
  }
  .groupName {
    margin-right: 10px;
  }
  .groupTable {
    margin: 10px 20px;
  }
}

.oddRow {
  background-color: rgb(242, 250, 250);
}

// public Detail card
.ant-card-body,
.datasetDetail,
.taskDetail, 
.error {
  .infoTable {
    margin-bottom: 20px;
    .ant-descriptions-view {
      border: none;
    }
    tr,th,td {
      border: none;
    }
    tr {
      margin-bottom: 1px;
      border-bottom: 1px solid #fff;
    }
  }
}
.datasetDetail,
.taskDetail, 
.error {
  .title {
    line-height: 18px;
    font-size: 16px;
    font-weight: bold;
    &::before {
      content: ' ';
      display: inline-block;
      width: 6px;
      height: 18px;
      background-color: #36CBCB;
      vertical-align: bottom;
      margin-right: 10px;
    }
  }
}

// public panel title
.panel {
  .header {
    margin-bottom: 10px;
    padding: 0 16px;
    height: 50px;
    line-height: 50px;
    background-color: #fafafa;
    color: rgba(0, 0, 0, 0.85);
    cursor: pointer;
    &:before {
      content: ' ';
      display: inline-block;
      margin-right: 10px;
      margin-top: 18px;
      height: 16px;
      width: 6px;
      background-color: @primary-color;
    }
    .title {
      font-size: 16px;
      font-weight: bold;
    }
    .foldBtn {
      color: @btn-primary-bg;
    }
  }
}

// public pager
.ant-pagination.pager {
  margin: 16px 0;
  text-align: right;
}

// search input
.search {
  .ant-form-item-label {
    font-weight: normal;
    text-align: left;
  }
  .ant-form-item {
    margin-bottom: 10px;
  }
  .ant-input-suffix {
    color: rgba(0, 0, 0, 45%);
  }
}
// icon text
.ant-btn,
.ant-space-item {
  .anticon + span {
    margin-left: 5px;
  } 
} 